"use strict";
class Person {
    // 方法
    constructor(name, age, gender) {
        this.name = name;
        this.age = age;
        this.gender = gender;
    }
    weixiu(computer) {
        console.log('我可以维修' + computer);
    }
}
// let xudong = new Person('徐东', 18, '男');
// xudong.weixiu('洗衣机');
//声明一个子类
class Programmer extends Person {
    //构造方法
    constructor(name, age, gender, language, keyboard) {
        super(name, age, gender); // 
        this.language = language;
        this.keyboard = keyboard;
    }
    program() {
        console.log(`我可以编写 ${this.language} 代码...`);
    }
    weixiu() {
        console.log('我可以修笔记本');
    }
}
//实例化
let tianqing = new Programmer('田晴', 18, '女', 'JavaScript', '双飞燕');
// tianqing.program();
// tianqing.weixiu();
/****************************** */
class Girl {
    constructor(name, age, weight) {
        this.name = name;
        this.age = age;
        this.weight = weight;
    }
    intro() {
        console.log(`我叫 ${this.name}, 今年 ${this.age}, 体重是 ${this.weight}`);
    }
}
class Test extends Girl {
    getInfo() {
        console.log(this.name);
        console.log(this.age);
        // console.log(this.weight); //X
        // console.log(123);
    }
}
let yaru = new Girl('亚茹', 24, 100);
// console.log(yaru.name); //√
// console.log(yaru.age); // X
// console.log(yaru.weight) // X 
// yaru.intro();
let gulinazha = new Test('古力娜扎', 30, 96);
gulinazha.getInfo();
